<template>
	<view class="container">
		<view class="header align-center justify-between plr14 ft16">
			<view :class="act==2?'on flex1':'flex1' " @click="change(2)">
				已完成
			</view>
			<view :class="act==1?'on flex1 middle':'flex1 middle' " @click="change(1)">
				未完成		
			</view>
			<view :class="act==3?'on flex1':'flex1' " @click="change(3)">
			已取消
			</view>
		</view>
		<view style="height: 110rpx;">

		</view>

		<view class="">
			  <view class="bgWhite radius10 boxshadow20 mlr15 plr15 ptb15 mt15 " v-for="(item,index) in orderList" :key="index">
					<view class="title ft16">
						{{item.title}}
					</view>
					<view class="pricebox justify-between align-center mt10">
						<text>￥999</text>
						<view class="">
							订单详情
						</view>
					</view>
			  </view>
			  <uv-empty v-if="orderList.length==0"></uv-empty>
		</view>


	</view>
</template>

<script>
	let app = getApp();
	export default {
		components: {

		},
		data() {
			return {
				act: 2,
				orderList:[]
			}
		},
		onLoad(opt) {
			this.getList()
	
		},
		mounted() {



			// 使用函数生成一个正弦波形


		},

		methods: {
					
				change(type){
					this.act=type;
					this.getList()
				},
				getList(){
						this.$api.orderList({status:this.act}).then(res=>{
							console.log(res)
							this.orderList =res.data
						})
				}
				
		
		}





	}
</script>
<style scoped lang="scss">
	page {
		color: #343434;
	}

	.header {
		width: 100%;
		height: 110rpx;
		background-color: #fff;

		box-sizing: border-box;
		color: #969696;
		position: fixed;
		top: 88rpx;
		left: 0;
		z-index: 999;
		display: flex;

		view {
			text-align: center;
			font-size: 28rpx;
			height: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
		}

		.on {
			color: #000;
			position: relative;
		}

		.on::after {
			content: "";
			width: 20rpx;
			height: 4rpx;

			background: #0082DB;
			position: absolute;
			bottom: 0;
			left: 0;
			right: 0;
			margin: auto;

		}

		.middle {
			position: relative;
		}

		.middle::after {
			content: "";
			width: 2rpx;
			height: 30rpx;
			background: #E0E0E0;
			position: absolute;
			top: 0;
			bottom: 0;
			margin: auto;
			right: 0;
		}

		.middle::before {
			content: "";
			width: 2rpx;
			height: 30rpx;
			background: #E0E0E0;
			position: absolute;
			top: 0;
			bottom: 0;
			margin: auto;
			left: 0;
		}
	}



	.tag {
		background-color: rgb(255, 219, 109);
		color: #fff;
		font-size: 26rpx;
		padding: 4rpx 8rpx;
		border-radius: 10rpx;
		margin-right: 10rpx;
	}

	.coursedata {
		padding: 20rpx;
		color: #969696;
		font-size: 24rpx;

		image {
			width: 300rpx;
			height: 236rpx;
			border-radius: 15rpx;
			margin-right: 20rpx;
		}

		.title {
			font-size: 33rpx;
			color: #000;
			margin-bottom: 10rpx;
		}

		.price {
			font-weight: bold;
			color: #1FACFF;
			font-size: 42rpx;
		}
	}

	.menudata {
		margin: 20rpx;
		height: 72rpx;
		border: 1px solid #cad9fe;
		font-size: 28rpx;
		border-radius: 10rpx;
		padding: 0 20rpx;
	}

	.moduletitle {
		height: 116rpx;

		text {

			width: 6rpx;
			height: 18rpx;
			background: #0082DB;
			border-radius: .5rem;
			display: block;
		}
	}

	.maininfo {
		border-top: 2rpx solid #E0E0E0;


	}

	.submit {
		width: 700rpx;
		padding: 20rpx;
		height: 140rpx;
		border-radius: 20rpx;
		position: fixed;
		left: 0;
		right: 0;
		margin: auto;
		bottom: 40rpx;
	}

	.logbtn {
		background: linear-gradient(180deg, #98D5FF 0%, #0082DB 100%);
		border-radius: 20rpx;
		width: 100%;
		height: 100rpx;
		text-align: center;
		line-height: 100rpx;
		color: #fff;
	}
	.slottitle{
		font-size: 34rpx;
		color: #343434;
		image{
			width: 56rpx;
			height: 56rpx;
		}
	}
	.contentbox{
		border: 1px solid #E0E0E0;
		border-radius: 15rpx;
		padding:10rpx 20rpx;
		font-size: 24rpx;
	}
	.contentTitle{
		width: 147rpx;
		height: 84rpx;
		background-image: url('../../static/images/bg6.png');
		background-size: 100% 100%;
		margin-right: 20rpx;
		text-align: center;
		line-height: 84rpx;
		color: #0082DB;
	}
	.pricebox{
		color: #0082DB;
		view{
			background: rgba(0, 130, 219,.2	);
			padding: 4rpx 10rpx;
			border-radius: 12rpx;
			font-size: 24rpx;
		}
	}
	// /deep/.uv-collapse-item__content{
	// 	height: auto!important;
	// }
</style>